/**
 * @Author: Boring
 * @Description:
 * @File:  pod
 * @Date: 2024-03-02 14:50
 */

package pod

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/pod"
)

func create(podGroup *gin.RouterGroup) {
	podGroup.POST("/create", pod.Create)
}

func update(podGroup *gin.RouterGroup) {
	podGroup.PUT("/update", pod.Update)
}

func delete(podGroup *gin.RouterGroup) {
	podGroup.DELETE("/delete", pod.Delete)
}

func deleteList(podGroup *gin.RouterGroup) {
	podGroup.POST("/deleteList", pod.DeleteList)
}

func get(podGroup *gin.RouterGroup) {
	podGroup.GET("/get", pod.Get)
}

func list(podGroup *gin.RouterGroup) {
	podGroup.GET("/list", pod.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	podGroup := g.Group("/pod")
	create(podGroup)
	update(podGroup)
	delete(podGroup)
	deleteList(podGroup)
	get(podGroup)
	list(podGroup)
}
